﻿@model IList<Grand.Web.Models.Newsletter.NewsletterSimpleCategory>
@if(Model.Any())
{
    <div class="row">
        <div class="col-12 form-group register-category-newsletter">
            <ul class="option-list pl-0">
                @foreach (var attribute in Model)
                {
                    <li>
                        @{
                            string controlId = $"customernewsletterCategory_{attribute.Id}";
                            string textPrompt = attribute.Name;
                        }
                        <label for="@(controlId)" class="custom-control custom-checkbox">
                            <input class="custom-control-input" id="@(controlId)" type="checkbox" name="@(controlId)" value="@(attribute.Id)" 
                                   checked="@(attribute.Selected)" />
                            <span class="custom-control-label"></span>
                            <span class="custom-control-description">@textPrompt</span>
                        </label>
                        <div>
                            @Html.Raw(attribute.Description)
                        </div>
                    </li>
                }
            </ul>
        </div>
    </div>
}
